home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / c-runtime / perf < prev    next >
Encoding:
Text File  |  1992-04-18  |  1.7 KB  |  46 lines

  1. Start of tests.  If you get here you're doing well.
  2. If you see this message then SubClass4 received a +initialize method
  3. If you see this message then SubClass1 received a +initialize method
  4. Subclass1 print
  5. Subclass1 print:this is a message sent to a instance of SubClass1 in a weird way
  6. obj=SubClass1, ivar=dumb, offset=4, obj size=22
  7. If you see this message then SubClass2 received a +initialize method
  8. SubClass2 print
  9. SubClass2 print:a message
  10. SubClass2 print:this is a message sent to a instance of SubClass2 in a weird way
  11. obj=SubClass2, ivar=dumb, offset=4, obj size=28
  12. If you see this message then SubClass3 received a +initialize method
  13. SubClass2 print
  14. SubClass2 print:This message comes to you from SubClass3 forwarded to it's super class, msg=a message
  15.  
  16. SubClass2 print:This message comes to you from SubClass3 forwarded to it's super class, msg=this is a message sent to a instance of SubClass2 in a weird way
  17.  
  18. obj=SubClass3, ivar=smart, offset=28, obj size=284
  19. a message from SubClass3, additionalClassMethod, First_Test category.
  20. a message from SubClass3, additionalClassMethodTwo, Second_Test category.
  21. Exit, the tests worked!  (you did compile with -DDEBUG -UNDEBUG didn't you?)
  22.  
  23.  
  24. Some performance data:
  25.  
  26. for (i = 0; i < ITERATIONS; ++i)
  27.   func ();
  28. 1000000 iterations, 0 sec  (+Infinity/sec)
  29.  
  30. aObj = [ Object new ];
  31. for (i = 0; i < ITERATIONS; ++i)
  32.   [ aObj self ];
  33. 1000000 iterations, 4 sec  (250000/sec)
  34.  
  35. aObj = [ SubClass3 new ];
  36. for (i = 0; i < ITERATIONS; ++i)
  37.   [ aObj self ];
  38.  (-self is implemented two classes up)
  39. 1000000 iterations, 3 sec  (333333.333333/sec)
  40.  
  41. aObj = [ SubClass3 new ];
  42. for (i = 0; i < ITERATIONS; ++i)
  43.   [[ aObj self ] self ];
  44. 1000000 iterations, 10 sec  (100000/sec)
  45.  
  46.